package cn.yunhe.controller.temp;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloSpringMvcController1 {

    @RequestMapping(value = "hello333",method = RequestMethod.GET)
    public ModelAndView helloSpringMvc(){
        ModelAndView modelAndView=new ModelAndView();
        //添加模型数据,可以是任意的POJO对象
        modelAndView.addObject("msg2springMvc","你好,springMVC!!!");
        //设置逻辑视图名,视图解析器根据改名字解析到具体的视图页面
        modelAndView.setViewName("hello222");
        return modelAndView;
    }
}
